-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix percentage issue #19345
fix percentage issue #19345
Conversation
...libs/cpq-quote/cpq-quote-discount/components/cpq-quote-discount-tbody/cpq-quote.component.ts
Outdated
Show resolved
Hide resolved
const discountAmount = (basePrice * discountPercentage) / 100; | ||
return basePrice - discountAmount; | ||
if ( | ||
basePrice !== undefined && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Baseprice you are already doing a null check when the function is called do you thing undefined is needed?
@@ -52,11 +52,18 @@ export class CpqQuoteDiscountComponent implements OnInit, OnDestroy { | |||
} | |||
getDiscountedPrice( | |||
basePrice: number | undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the price be of type number, or can it be of any other type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it ll be numeric
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base price can be like 58.50 . If its number wont it change the price?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the number type can represent both integer and floating-point values, including decimals like 58.50.
integration-libs/cpq-quote/cpq-quote-discount/components/cpq-quote/cpq-quote-offer.component.ts
Show resolved
Hide resolved
spartacus Run #45320
Run Properties:
|
Project |
spartacus
|
Run status |
Passed #45320
|
Run duration | 03m 44s |
Commit |
b135d3978a ℹ️: Merge 9ef644f2dcd0a97be6d69bc091978cb946e1ccaa into 1404d80f10650f100527783a7dd3...
|
Committer | Jali-Khusi |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
3
|
Pending |
2
|
Skipped |
0
|
Passing |
125
|
https://jira.tools.sap/browse/CXSPA-8479